namespace SharpTalk.Core
{
    using Base;
    using System;
    using Enums;
    using System.Runtime.Serialization;
    /// <summary>
    /// Represents the internal system user
    /// </summary>
    [DataContract]
    [Serializable]
    internal sealed class SystemUser : UserBase
    {
        /// <summary>
        /// User nickname constant
        /// </summary>
        private const string NICKNAME = "System";

        /// <summary>
        /// Create a new instance of the <see cref="T:SharpTalk.Core.SystemUser"/> class.
        /// </summary>
        internal SystemUser()
            : this(Guid.Empty)
        {
        }

        /// <summary>
        /// Create a new instance of the <see cref="T:SharpTalk.Core.SystemUser"/> class.
        /// </summary>
        /// <param name="guid">User guid</param>
        private SystemUser(Guid guid) 
            : base(guid)
        {
        }

        /// <summary>
        /// Obtains the user status. Allways returns UserStatusEnum.Online
        /// </summary>
        [DataMember]
        public override UserStatusEnum Status
        {
            get { return UserStatusEnum.Online; }
            set { }
        }

        /// <summary>
        /// Obtains a custom status. Allways returns null
        /// </summary>
        [DataMember]
        public override string CustomStatus
        {
            get { return null; }
            set { }
        }

        /// <summary>
        /// Obtains or defines the image. Allways returns null
        /// </summary>
        [DataMember]
        public override byte[] Image
        {
            get { return null; }
            set { }
        }

        /// <summary>
        /// Obtains the first name of the user. Allways returns null
        /// </summary>
        [DataMember]
        public override string FirstName
        {
            get { return null; }
            set { }
        }

        /// <summary>
        /// Obtains the last name of the user. Allways returns null
        /// </summary>
        [DataMember]
        public override string LastName
        {
            get { return null; }
            set { }
        }

        /// <summary>
        /// Obtains the user nickname
        /// </summary>
        [DataMember]
        public override string NickName
        {
            get { return NICKNAME; }
            set { }
        }

        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public override string ToString()
        {
            return NickName;
        }
    }
}